#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>

int main()
{
    chdir("/home/Greg_122/");
    
    FILE* fp = fopen("file.txt", "w");
    if (fp == NULL)
    {
        perror("fopen:");
        return 1;
    }

    pid_t pid = getpid();
    while(1)
    {
        printf("hello linux!, I am a process, pid: %d\n", pid);
        sleep(1);
    }

} 

